<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增医院社区')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-hospital-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">医院或社区名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">类型：</label>
                <div class="col-sm-8">
                    <select name="type" class="form-control m-b">
                        <option value="1">医院</option>
                        <option value="2">社区</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
<!--            <div class="form-group">-->
<!--                <label class="col-sm-3 control-label">服务项目：</label>-->
<!--                <th:block th:each="item:${itemList}">-->
<!--                    <input th:id="'role_' + ${item.id}" name="itemIdList" type="checkbox"-->
<!--                           th:value="${item.id}">-->
<!--                    <label th:for="'role_' + ${item.id}" th:text="${item.name}"></label>-->
<!--                </th:block>-->
<!--            </div>-->
            <div class="form-group">
                <label class="col-sm-3 control-label">经度：</label>
                <div class="col-sm-8">
                    <input name="lng" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">纬度：</label>
                <div class="col-sm-8">
                    <input name="lat" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">省份ID：</label>
                <div class="col-sm-8">
                    <input name="provinceId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">城市ID：</label>
                <div class="col-sm-8">
                    <input name="cityId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">区域ID：</label>
                <div class="col-sm-8">
                    <input name="areaId" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "jiajia/hospital"
        $("#form-hospital-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-hospital-add').serialize());
            }
        }
    </script>
</body>
</html>